{% extends "forum/manage/main.html" %}
{% block configures %}
<div id="mng_users_menu">
    <span id="mng_users_title">用户管理</span>
    <span id="mng_users_toplinks">
    {% spaceless %}
    <a href="{% url 'member_operate' action='add' %}" id="mng_users_link_add">新增用户</a>|
    <a href="#">重置密码</a>|
    <a href="{% url 'member_operate' action='del' %}" id="manage_users_del" >删除账号</a>|
    <a href="#">发送邮件</a>|
    <a href="#">查看发贴</a>
    {% endspaceless %}
    </span>
</div>
<form action="" method="post">
<table id='mng_users_maintb'>
    <thead>
        <tr>
            <th class="mng_users_select"><input type="checkbox" id="mng_users_selectall" /></th>
            <th class="mng_users_id">编号</th>
            <th class="mng_users_username">用户名</th>
            <th class="mng_users_email">邮箱</th>
            <th class="mng_users_date">注册</th>
            <th class="mng_users_posts">发贴数</th>
            <th class="mng_users_opt">操作</th>
        </tr>
    </thead>
    <tbody>
        {% for user in users %}
        <tr class="{% cycle "mng_users_trbga" "mng_users_trbgb" %}">
            <td class="mng_users_select"><input type="checkbox" name="selected_items" value={{ user.id }} /></td>
            <td class="mng_users_id">{{ user.id }}</td>
            <td class="mng_users_username">{{ user.username|truncatechars:12 }}</td>
            <td class="mng_users_email">{{ user.email|truncatechars:18 }}</td>
            <td class="mng_users_date">{{ user.date_joined|date:"y/m/d" }}</td>
            <td class="mng_users_posts">{{ user.topic__count }}</td>
            <td class="mng_users_opt">
                <a href="{% url 'member_operate' action='add' %}">修改信息</a>|<a href="#">重置密码</a>|<a href="#">发送邮件</a>
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
</form>
{% endblock configures %}
